/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */

let selectDataTransfrom = <T>(data: T[]): Array<Record<'label' | 'value', T>>=> {
    let list: Record<'label'|'value', T>[] = [];
    if (data.length > 0) {
        data.forEach(item=>{
            list.push({
                label:item,
                value:item
            });
        });
    }
    return list;
};

export default selectDataTransfrom;